package com.ywq.app.domain;

import java.io.Serializable;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;

public class ArtAuction implements Serializable {

	private static final long serialVersionUID = -4316180995919582463L;
	private String identifier;
	private String member;
	private String endDate;
	private String startDate;
	private String startTime;
	private String endTime;
	private String cover;
	private String description;
	private String title;
	private String subtitle;
	private Date gmtCreated;
	private Date gmtModified;
	private Boolean isShow;
	private Date sDate;
	private Date eDate;
	private Date sTime;
	private Date eTime;
	private String address;
	private String titlePic;
	private List<ArtAuctionPic> auctionPicList;
	
	private List<ArtPic> aPicList;

	public List<ArtPic> getaPicList() {
		return aPicList;
	}

	public void setaPicList(List<ArtPic> aPicList) {
		this.aPicList = aPicList;
	}

	public List<ArtAuctionPic> getAuctionPicList() {
		return auctionPicList;
	}

	public void setAuctionPicList(List<ArtAuctionPic> auctionPicList) {
		this.auctionPicList = auctionPicList;
	}

	public String getTitlePic() {
		return titlePic;
	}

	public void setTitlePic(String titlePic) {
		this.titlePic = titlePic;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public Date getsTime() {
		return sTime;
	}

	public void setsTime(Date sTime) {
		this.sTime = sTime;
	}

	public Date geteTime() {
		return eTime;
	}

	public void seteTime(Date eTime) {
		this.eTime = eTime;
	}

	public Date getsDate() {
		return sDate;
	}

	public void setsDate(Date sDate) {
		this.sDate = sDate;
	}

	public Date geteDate() {
		return eDate;
	}

	public void seteDate(Date eDate) {
		this.eDate = eDate;
	}

	public Boolean getIsShow() {
		return isShow;
	}

	public void setIsShow(Boolean isShow) {
		this.isShow = isShow;
	}

	public String getIdentifier() {
		return identifier;
	}

	public void setIdentifier(String identifier) {
		this.identifier = identifier;
	}

	public String getMember() {
		return member;
	}

	public void setMember(String member) {
		this.member = member;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	public String getStartDate() {
		return startDate;
	}

	public void setStartDate(String startDate) {
		this.startDate = startDate;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public String getCover() {
		return cover;
	}

	public void setCover(String cover) {
		this.cover = cover;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getSubtitle() {
		return subtitle;
	}

	public void setSubtitle(String subtitle) {
		this.subtitle = subtitle;
	}

	public Date getGmtCreated() {
		return gmtCreated;
	}

	public void setGmtCreated(Date gmtCreated) {
		this.gmtCreated = gmtCreated;
	}

	public Date getGmtModified() {
		return gmtModified;
	}

	public void setGmtModified(Date gmtModified) {
		this.gmtModified = gmtModified;
	}

	public int getYear() throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date date = sdf.parse(startDate);
			Calendar calendar = new GregorianCalendar();
		 calendar.setTime(date);
		int year = calendar.get(Calendar.YEAR);
		return year;
	}
	public String getMonth() throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date date = sdf.parse(startDate);
			Calendar calendar = new GregorianCalendar();
		 calendar.setTime(date);
		int month = calendar.get(Calendar.MONTH);
		String monehChina="";
		String [] months={"一","二","三","四","五","六","七","八","九","十","十一","十二"};
		for(int i=1;i<=12;i++){
				if(month==i){
					monehChina=months[i];
				}
			}
		return monehChina;
		}
		
	public int getDay() throws ParseException {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		Date date = sdf.parse(startDate);
			Calendar calendar = new GregorianCalendar();
		 calendar.setTime(date);
		int day = calendar.get(Calendar.DAY_OF_MONTH);
		return day;
	}

}
